[vars]
filesize=3800328
sha512=a9e450cd700b32ccf0dec82fa2faad15016860db1e1448fafa01541ec280a59a951670338afc634472856021e8227426552f6c41b9eaddcddd3712ad709a673a
tardir=dpkg-1.16.15

[mirrors]
http://http.debian.net/debian/pool/main/d/dpkg/dpkg_1.16.15.tar.xz

[deps]
zlib
bzip2
xz
ncurses

[deps.host]
perl

[build]
patch -p1 < "$K"/dpkg.patch

[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"

CFLAGS="-D_GNU_SOURCE $optcflags" LDFLAGS="$optldflags" \
  ./configure -C --prefix="$butch_prefix" \
  --sbindir="$butch_prefix"/bin --disable-install-info \
  --disable-update-alternatives --disable-start-stop-daemon \
  --disable-dselect $xconfflags

make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install
